package com.cll.learn.queue;

/**
 * 描述信息:
 *
 * @author CLL
 * @version 1.0
 * @date 2021/5/15 20:26
 */
public class GetThread implements Runnable{

    private final MyBlockingQueue myBlockingQueue;

    public GetThread(MyBlockingQueue myBlockingQueue) {
        this.myBlockingQueue = myBlockingQueue;
    }

    @Override
    public void run() {
        while (true) {
            try {
                Thread.sleep(200);
                Integer integer = myBlockingQueue.get();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
